﻿<phone:PhoneApplicationPage x:Class="TourThailand.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            Orientation="Portrait"
                            SupportedOrientations="Portrait"
                            shell:SystemTray.IsVisible="True"
                            toolkit:TiltEffect.IsTiltEnabled="True"
                            mc:Ignorable="d">
    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="LocationRecommendCollectionItemTemplate">
            <StackPanel Margin="0,0,0,20" Background="#B2000000">
                <TextBlock Margin="10"
                           FontSize="24"
                           Text="{Binding Title}" />
                <TextBlock Text="{Binding Description}"
                           Visibility="Collapsed"
                           d:IsHidden="True" />
                <Image Margin="10" Source="{Binding ImagePath}" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="ActivityCollectionItemTemplate">
            <StackPanel Margin="0,0,0,10"
                        Background="#B2000000"
                        Orientation="Horizontal">
                <Image Width="150"
                       Margin="10,10,5,10"
                       HorizontalAlignment="Left"
                       Source="{Binding ImagePath}"
                       Stretch="UniformToFill" />
                <StackPanel Margin="5,10,0,10" Orientation="Vertical">
                    <TextBlock HorizontalAlignment="Left"
                               Foreground="#FFFF9700"
                               Text="{Binding Title}" />
                    <TextBlock HorizontalAlignment="Left"
                               FontStyle="Italic"
                               Foreground="#FFA8A8A8"
                               Text="{Binding ActivityType}" />
                    <TextBlock Width="200"
                               HorizontalAlignment="Left"
                               Text="{Binding Description}"
                               TextTrimming="WordEllipsis" />
                    <TextBlock HorizontalAlignment="Left"
                               FontSize="16"
                               Foreground="#FF00D4DE"
                               Text="{Binding ActivityDate}" />
                </StackPanel>
            </StackPanel>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>

    <!--  LayoutRoot is the root grid where all page content is placed  -->

    <phone:PhoneApplicationPage.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal" />
    </phone:PhoneApplicationPage.FontFamily>
    <phone:PhoneApplicationPage.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal" />
    </phone:PhoneApplicationPage.FontSize>
    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush" />
    </phone:PhoneApplicationPage.Foreground>
    <Grid DataContext="{Binding Source={StaticResource TourThaiData}}">
        <phone:Panorama Title="เที่ยวไทย">
            <phone:Panorama.Background>
                <ImageBrush ImageSource="Images/kohnghi2.jpg"
                            Opacity="0.8"
                            Stretch="UniformToFill" />
            </phone:Panorama.Background>
            <phone:PanoramaItem Header="เมนู">
                <ScrollViewer>
                    <StackPanel Background="#7F000000">
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="ประเทศไทย"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="การเดินทาง"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="ข้อมูลจังหวัด"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="สถานที่ท่องเที่ยว"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="ที่พัก"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="ร้านอาหาร"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="ช้อปปิ้ง"
                                FontSize="32" />
                        <Button HorizontalAlignment="Left"
                                BorderThickness="0"
                                Content="โปรโมชั่น"
                                FontSize="32" />
                    </StackPanel>
                </ScrollViewer>
            </phone:PanoramaItem>
            <phone:PanoramaItem Header="สถานที่แนะนำ">
                <phone:LongListSelector x:Name="LocationLongList"
                                        ItemTemplate="{StaticResource LocationRecommendCollectionItemTemplate}"
                                        ItemsSource="{Binding LocationRecommendCollection}"
                                        Tap="locationTab" />
            </phone:PanoramaItem>
            <phone:PanoramaItem Header="งานประเพณี">
                <phone:LongListSelector ItemTemplate="{StaticResource ActivityCollectionItemTemplate}" ItemsSource="{Binding ActivityCollection}" />
            </phone:PanoramaItem>
        </phone:Panorama>
    </Grid>

</phone:PhoneApplicationPage>